<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        // 第一种情况
        // let fn1 = function(a,b){
        //     let c = 200;
        //     return a+b+c;
        // }

        let fn1 = (a,b) => {
            let c = 200;
            return a + b + c;
        }


        // 第二种情况：函数体只有一行，并且就是return的值，可以进一步简化
        // let fn2 = (a,b)=>{
        //     return a + b;
        // }

        let fn2 = (a,b)=>a+b;


        // let fn3 = (a)=>a*a;

        let fn3 = a=>a*a;
    </script>
</body>
</html>